Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper support for transparent wrappers in typed mongo #428

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

ghik
Copy link
Contributor

@ghik ghik commented Jan 13, 2023

No description provided.

@ghik ghik requested a review from ddworak January 13, 2023 16:41
@ddworak
Copy link
Member

ddworak commented Jan 17, 2023

Should we care about differences in handling transparent wrappings and @transparent annotation?

@ghik
Copy link
Contributor Author

ghik commented Jan 18, 2023

@ddworak yes, that irks me too and I was thinking whether I should unify how MongoAdtFormat represents case classes with @transparent and types with TransparentWrapping.

In the end I decided not to do it because:

  • @transparent is somewhat deprecated, you should favor TransparentWrapping where possible
  • @transparent requires that the type is a case class (-ish) so in the end it is accurate to represent its format with MongoAdtFormat.RecordFormat

Yes, it's kind of arbitrary and not very pretty but it will only cause problems if someone decided to manually inspect MongoAdtFormat instances.

Copy link
Member

@ddworak ddworak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understandable. Let's ship it 🚢

@ddworak ddworak merged commit 8802150 into master Jan 18, 2023
@ddworak ddworak deleted the mongoref-transparent branch January 18, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants